const Http = require('./http');
const Api= require('./api');

class ActivityService {
  static getActivityStore(id,openid) {
    return Http.request({
      url: Api.getActivityStore,
      data: {
              activity_store_id:id,
              openid: openid
            }
    });
  }

  static getProductInfo(id,openid) {
    return Http.request({
      url: Api.getProductInfo,
      data: {
              product_id:id,
              openid:openid
            }
    });
  }

  static getMerchantInfo(id,openid) {
    return Http.request({
      url: Api.getMerchantInfo,
      data: {
              mid:id,
              openid:openid
            }
    });
  }

  static fangweiVerify(qrcode_type,se,openid,mid,sn,qrcode) {
    return Http.request({
      url: Api.fangweiVerify,
      data: {
              se:se,
              qrcode_type: qrcode_type,
              openid: openid,
              mid: mid,
              sn: sn,
              qrcode: qrcode
            }
    });
  }
  static getProcessInfo(activity_id,project_type,openid) {
    return Http.request({
      url: Api.getProcessInfo,
      data: {
              activity_id:activity_id,
              project_type: project_type,
              openid: openid
            }
    });
  }  
  static getSecondProcess(mid,activity_id,first_process_id,project_type,openid) {
    return Http.request({
      url: Api.getSecondProcess,
      data: {
              mid:mid,
              activity_id:activity_id,
              first_process_id:first_process_id,
              project_type: project_type,
              openid: openid
            }
    });
  }
  static getCollectData(mid,activity_id,suyuan_proc_id,suyuan_data_id,project_type,openid) {
    return Http.request({
      url: Api.getCollectData,
      data: {
              mid:mid,
              activity_id:activity_id,
              suyuan_proc_id:suyuan_proc_id,
              suyuan_data_id:suyuan_data_id,
              project_type: project_type,
              openid: openid
            }
    });
  }
  static getShelfLife(activity_id,project_type,openid) {
    return Http.request({
      url: Api.getShelfLife,
      data: {
              activity_id:activity_id,
              project_type: project_type,
              openid: openid
            }
    });
  }
  static getProductInfo(activity_id,project_type,openid) {
    return Http.request({
      url: Api.getProductInfo,
      data: {
              activity_id:activity_id,
              project_type:project_type,
              openid:openid
            }
    });
  }
  static fangweiVerify(se,project_type,openid,mid,sn) {
    return Http.request({
      url: Api.fangweiVerify,
      data: {
              se:se,
              project_type: project_type,
              openid: openid,
              mid: mid,
              sn: sn
            }
    });
  }
}
module.exports = ActivityService;